<?php
use core\HttpSession;
use core\Bootstrap;
session_start();

function __autoload($class){
	$file = $class.".php";
	if(file_exists($file)){
		require_once $file;
	} else {
		throw new Exception("Erro: nonexistent file {$file}");
	}
}

$httpSession = HttpSession::getInstance();
new Bootstrap(($httpSession->hasParameter(Bootstrap::$ACTION) ? $httpSession->getParameter(Bootstrap::$ACTION) : "home\HomeGateway"));
?>